function get(url, type, callback) {
    $.ajax({
        url: url,
        type: type,
        dataType: "json",
        beforeSend: function () {
            callback.loading();
        },
        success: function (data) {
            callback.success(data);
            console.log(data);


        },
        error: function (XMLHttpRequest, textStatus, errorThrown) {
            callback.error();

        }
    });


}

// 判断字符串是不是URL
function checkUrl(url) {
    var strReg = "/((http|ftp|https|file):\/\/([\w\-]+\.)+[\w\-]+(\/[\w\u4e00-\u9fa5\-\.\/?\@\%\!\&=\+\~\:\#\;\,]*)?)*";
    var re = new RegExp(strReg);
    if (!re.test(url)) {
        return false;
    } else {
        return true;
    }

}
//唤起APP

function startApp(scheme) {

    var downloadApp = 'https://www.baidu.com/';
    window.location.href = scheme;
    t = Date.now();

    setTimeout(function () {
        if (Date.now() - t < 1200) {
            window.location.href = downloadApp;
        }
    }, 1000);

    return false;

}
